```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LRU缓存实现 - 算法可视化解析</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f8fafc;
            color: #1e293b;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #c4b5fd 100%);
        }
        .code-block {
            background-color: #1e293b;
            border-left: 4px solid #6366f1;
        }
        .node-active {
            box-shadow: 0 0 0 2px #6366f1;
        }
        .transition-all {
            transition: all 0.3s ease;
        }
        .text-gradient {
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-4xl md:text-5xl font-bold mb-4 leading-tight">LRU缓存<br>算法可视化解析</h1>
                    <p class="text-xl mb-8 opacity-90">探索最近最少使用缓存的高效实现原理</p>
                    <div class="flex space-x-4">
                        <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full flex items-center">
                            <i class="fas fa-project-diagram mr-2"></i>
                            <span>双向链表</span>
                        </div>
                        <div class="bg-white bg-opacity-20 px-4 py-2 rounded-full flex items-center">
                            <i class="fas fa-table mr-2"></i>
                            <span>哈希表</span>
                        </div>
                    </div>
                </div>
                <div class="md:w-1/2">
                    <div class="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-sm border border-white border-opacity-20">
                        <h3 class="text-xl font-semibold mb-4 flex items-center">
                            <i class="fas fa-lightbulb mr-2 text-yellow-300"></i>
                            核心思想
                        </h3>
                        <p class="mb-4">使用哈希表实现O(1)时间复杂度的键值查找，通过双向链表维护数据访问顺序。</p>
                        <div class="grid grid-cols-2 gap-4">
                            <div class="bg-white bg-opacity-10 p-3 rounded-lg">
                                <div class="text-sm opacity-80 mb-1">时间复杂度</div>
                                <div class="text-xl font-bold">O(1)</div>
                            </div>
                            <div class="bg-white bg-opacity-10 p-3 rounded-lg">
                                <div class="text-sm opacity-80 mb-1">空间复杂度</div>
                                <div class="text-xl font-bold">O(n)</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="container mx-auto max-w-6xl px-4 py-12">
        <!-- Problem Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-2 h-8 bg-indigo-500 rounded-full mr-3"></div>
                <h2 class="text-2xl font-bold">题目描述</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md p-6 mb-8">
                <p class="text-lg text-gray-700">设计并实现一个最近最少使用（LRU）缓存结构。它应该支持 <code class="bg-gray-100 px-2 py-1 rounded">get</code> 和 <code class="bg-gray-100 px-2 py-1 rounded">put</code> 操作，并在容量满时淘汰最久未使用的数据。</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <h3 class="text-xl font-semibold mb-4 flex items-center text-indigo-600">
                        <i class="fas fa-sitemap mr-2"></i>
                        数据结构关系图
                    </h3>
                    <div class="bg-white rounded-xl shadow-md p-6 h-full">
                        <div class="mermaid">
                            graph LR
                                A[哈希表] -->|快速查找| B(键值对)
                                C[双向链表] -->|维护顺序| D(头节点)
                                C -->|维护顺序| E(尾节点)
                                B -->|关联| F[链表节点]
                                F -->|prev| G[前驱节点]
                                F -->|next| H[后继节点]
                                D -->|next| F
                                E -->|prev| F
                        </div>
                    </div>
                </div>
                <div>
                    <h3 class="text-xl font-semibold mb-4 flex items-center text-indigo-600">
                        <i class="fas fa-project-diagram mr-2"></i>
                        操作流程图
                    </h3>
                    <div class="bg-white rounded-xl shadow-md p-6 h-full">
                        <div class="mermaid">
                            flowchart TD
                                A[put操作] --> B{键是否存在?}
                                B -->|是| C[更新值并移到头部]
                                B -->|否| D[创建新节点]
                                D --> E[添加到哈希表]
                                E --> F[添加到链表头部]
                                F --> G{容量已满?}
                                G -->|是| H[移除尾部节点]
                                G -->|否| I[结束]
                                H --> J[从哈希表删除]
                                J --> I

                                K[get操作] --> L{键是否存在?}
                                L -->|是| M[移到链表头部]
                                M --> N[返回值]
                                L -->|否| O[返回-1]
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Solution Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-2 h-8 bg-indigo-500 rounded-full mr-3"></div>
                <h2 class="text-2xl font-bold">解决方案</h2>
            </div>
            
            <div class="grid md:grid-cols-3 gap-6 mb-8">
                <div class="bg-white rounded-xl shadow-md p-6 transition-all hover:shadow-lg">
                    <div class="text-indigo-500 mb-3">
                        <i class="fas fa-code-branch text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">双向链表</h3>
                    <p class="text-gray-600">维护数据访问顺序，最新访问的节点移动到头部，最久未使用的节点位于尾部。</p>
                </div>
                <div class="bg-white rounded-xl shadow-md p-6 transition-all hover:shadow-lg">
                    <div class="text-indigo-500 mb-3">
                        <i class="fas fa-search text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">哈希表</h3>
                    <p class="text-gray-600">存储键到链表节点的映射，实现O(1)时间复杂度的键值查找。</p>
                </div>
                <div class="bg-white rounded-xl shadow-md p-6 transition-all hover:shadow-lg">
                    <div class="text-indigo-500 mb-3">
                        <i class="fas fa-exchange-alt text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-2">高效操作</h3>
                    <p class="text-gray-600">所有操作(put/get)时间复杂度均为O(1)，空间复杂度O(capacity)。</p>
                </div>
            </div>

            <div class="mb-8">
                <h3 class="text-xl font-semibold mb-4 flex items-center">
                    <i class="fas fa-list-ol mr-2 text-indigo-500"></i>
                    关键操作步骤
                </h3>
                <div class="space-y-4">
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4 font-bold">1</div>
                        <div>
                            <h4 class="font-semibold">添加节点</h4>
                            <p class="text-gray-600">新节点插入链表头部，并添加到哈希表中</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4 font-bold">2</div>
                        <div>
                            <h4 class="font-semibold">访问节点</h4>
                            <p class="text-gray-600">当节点被访问时，将其移到链表头部</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="bg-indigo-100 text-indigo-800 w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 mr-4 font-bold">3</div>
                        <div>
                            <h4 class="font-semibold">容量管理</h4>
                            <p class="text-gray-600">容量满时，移除链表尾部节点并从哈希表删除</p>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Code Section -->
        <section>
            <div class="flex items-center mb-6">
                <div class="w-2 h-8 bg-indigo-500 rounded-full mr-3"></div>
                <h2 class="text-2xl font-bold">实现代码</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
                <div class="bg-gray-800 text-gray-300 px-4 py-2 flex items-center">
                    <div class="flex space-x-2 mr-4">
                        <div class="w-3 h-3 rounded-full bg-red-500"></div>
                        <div class="w-3 h-3 rounded-full bg-yellow-500"></div>
                        <div class="w-3 h-3 rounded-full bg-green-500"></div>
                    </div>
                    <span class="text-sm">LRUCache.java</span>
                </div>
                <div class="code-block p-4 overflow-x-auto">
                    <pre class="text-gray-300 font-mono text-sm leading-relaxed">
<span class="text-purple-300">import</span> java.util.HashMap;
<span class="text-purple-300">import</span> java.util.Map;

<span class="text-gray-500">/**
 * LRU缓存实现
 * 使用双向链表和哈希表实现O(1)时间复杂度的get和put操作
 */</span>
<span class="text-purple-300">public class</span> <span class="text-blue-400">LRUCache</span> {
    <span class="text-gray-500">// 双向链表节点类</span>
    <span class="text-purple-300">private class</span> <span class="text-blue-400">Node</span> {
        <span class="text-purple-300">int</span> key;
        <span class="text-purple-300">int</span> value;
        Node prev;
        Node next;
        
        <span class="text-purple-300">public</span> Node() {}
        
        <span class="text-purple-300">public</span> Node(<span class="text-purple-300">int</span> key, <span class="text-purple-300">int</span> value) {
            <span class="text-purple-300">this</span>.key = key;
            <span class="text-purple-300">this</span>.value = value;
        }
    }
    
    <span class="text-gray-500">// 缓存容量</span>
    <span class="text-purple-300">private final int</span> capacity;
    <span class="text-gray-500">// 哈希表，存储key到节点的映射</span>
    <span class="text-purple-300">private</span> Map&lt;Integer, Node&gt; cache;
    <span class="text-gray-500">// 双向链表的头尾节点（哑节点）</span>
    <span class="text-purple-300">private</span> Node head;
    <span class="text-purple-300">private</span> Node tail;
    <span class="text-gray-500">// 当前缓存中的元素数量</span>
    <span class="text-purple-300">private int</span> size;
    
    <span class="text-gray-500">/**
     * 构造函数
     * @param capacity 缓存容量
     */</span>
    <span class="text-purple-300">public</span> LRUCache(<span class="text-purple-300">int</span> capacity) {
        <span class="text-purple-300">this</span>.capacity = capacity;
        <span class="text-purple-300">this</span>.cache = <span class="text-purple-300">new</span> HashMap&lt;&gt;();
        
        <span class="text-gray-500">// 初始化双向链表</span>
        head = <span class="text-purple-300">new</span> Node();
        tail = <span class="text-purple-300">new</span> Node();
        head.next = tail;
        tail.prev = head;
        
        <span class="text-purple-300">this</span>.size = <span class="text-amber-300">0</span>;
    }
    
    <span class="text-gray-500">/**
     * 获取缓存中的值
     * @param key 键
     * @return 如果键存在则返回对应的值，否则返回-1
     */</span>
    <span class="text-purple-300">public int</span> get(<span class="text-purple-300">int</span> key) {
        <span class="text-gray-500">// 检查键是否存在</span>
        Node node = cache.get(key);
        <span class="text-purple-300">if</span> (node == <span class="text-purple-300">null</span>) {
            <span class="text-purple-300">return</span> -<span class="text-amber-300">1</span>;
        }
        
        <span class="text-gray-500">// 将访问的节点移到链表头部</span>
        moveToHead(node);
        
        <span class="text-purple-300">return</span> node.value;
    }
    
    <span class="text-gray-500">/**
     * 添加或更新缓存
     * @param key 键
     * @param value 值
     */</span>
    <span class="text-purple-300">public void</span> put(<span class="text-purple-300">int</span> key, <span class="text-purple-300">int</span> value) {
        Node node = cache.get(key);
        
        <span class="text-purple-300">if</span> (node == <span class="text-purple-300">null</span>) {
            <span class="text-gray-500">// 创建新节点</span>
            Node newNode = <span class="text-purple-300">new</span> Node(key, value);
            cache.put(key, newNode);
            
            <span class="text-gray-500">// 添加到链表头部</span>
            addToHead(newNode);
            size++;
            
            <span class="text-gray-500">// 如果超出容量，删除最久未使用的节点（链表尾部）</span>
            <span class="text-purple-300">if</span> (size > capacity) {
                Node removed = removeTail();
                cache.remove(removed.key);
                size--;
            }
        } <span class="text-purple-300">else</span> {
            <span class="text-gray-500">// 更新已存在节点的值</span>
            node.value = value;
            <span class="text-gray-500">// 将节点移到链表头部</span>
            moveToHead(node);
        }
    }
    
    <span class="text-gray-500">/**
     * 将节点添加到链表头部
     * @param node 要添加的节点
     */</span>
    <span class="text-purple-300">private void</span> addToHead(Node node) {
        node.prev = head;
        node.next = head.next;
        head.next.prev = node;
        head.next = node;
    }
    
    <span class="text-gray-500">/**
     * 从链表中删除节点
     * @param node 要删除的节点
     */</span>
    <span class="text-purple-300">private void</span> removeNode(Node node) {
        node.prev.next = node.next;
        node.next.prev = node.prev;
    }
    
    <span class="text-gray-500">/**
     * 将节点移到链表头部
     * @param node 要移动的节点
     */</span>
    <span class="text-purple-300">private void</span> moveToHead(Node node) {
        removeNode(node);
        addToHead(node);
    }
    
    <span class="text-gray-500">/**
     * 删除并返回链表尾部节点
     * @return 被删除的尾部节点
     */</span>
    <span class="text-purple-300">private</span> Node removeTail() {
        Node removed = tail.prev;
        removeNode(removed);
        <span class="text-purple-300">return</span> removed;
    }
    
    <span class="text-gray-500">/**
     * 使用示例
     */</span>
    <span class="text-purple-300">public static void</span> main(String[] args) {
        <span class="text-gray-500">// 创建容量为2的LRU缓存</span>
        LRUCache cache = <span class="text-purple-300">new</span> LRUCache(<span class="text-amber-300">2</span>);
        
        <span class="text-gray-500">// 添加键值对(1, 1)</span>
        cache.put(<span class="text-amber-300">1</span>, <span class="text-amber-300">1</span>);
        System.out.println(<span class="text-emerald-300">"添加: (1, 1)"</span>);
        
        <span class="text-gray-500">// 添加键值对(2, 2)</span>
        cache.put(<span class="text-amber-300">2</span>, <span class="text-amber-300">2</span>);
        System.out.println(<span class="text-emerald-300">"添加: (2, 2)"</span>);
        
        <span class="text-gray-500">// 获取键1的值</span>
        System.out.println(<span class="text-emerald-300">"获取键1: "</span> + cache.get(<span class="text-amber-300">1</span>));  <span class="text-gray-500">// 返回1</span>
        
        <span class="text-gray-500">// 添加键值对(3, 3)，这会导致键2被淘汰</span>
        cache.put(<span class="text-amber-300">3</span>, <span class="text-amber-300">3</span>);
        System.out.println(<span class="text-emerald-300">"添加: (3, 3)，键2被淘汰"</span>);
        
        <span class="text-gray-500">// 获取键2的值</span>
        System.out.println(<span class="text-emerald-300">"获取键2: "</span> + cache.get(<span class="text-amber-300">2</span>));  <span class="text-gray-500">// 返回-1（未找到）</span>
        
        <span class="text-gray-500">// 添加键值对(4, 4)，这会导致键1被淘汰</span>
        cache.put(<span class="text-amber-300">4</span>, <span class="text-amber-300">4</span>);
        System.out.println(<span class="text-emerald-300">"添加: (4, 4)，键1被淘汰"</span>);
        
        <span class="text-gray-500">// 获取键1的值</span>
        System.out.println(<span class="text-emerald-300">"获取键1: "</span> + cache.get(<span class="text-amber-300">1</span>));  <span class="text-gray-500">// 返回-1（未找到）</span>
        
        <span class="text-gray-500">// 获取键3的值</span>
        System.out.println(<span class="text-emerald-300">"获取键3: "</span> + cache.get(<span class="text-amber-300">3</span>));  <span class="text-gray-500">// 返回3</span>
        
        <span class="text-gray-500">// 获取键4的值</span>
        System.out.println(<span class="text-emerald-300">"获取键4: "</span> + cache.get(<span class="text-amber-300">4</span>));  <span class="text-gray-500">// 返回4</span>
    }
}</pre>
                </div>
            </div>
        </section>

        <!-- Visualization Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-2 h-8 bg-indigo-500 rounded-full mr-3"></div>
                <h2 class="text-2xl font-bold">动态演示</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-6">
                <div class="flex justify-between items-center mb-6">
                    <h3 class="text-xl font-semibold">LRU缓存操作可视化</h3>
                    <div class="flex space-x-2">
                        <button class="bg-indigo-100 text-indigo-700 px-4 py-2 rounded-lg hover:bg-indigo-200 transition-all">重置</button>
                        <button class="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 transition-all">下一步</button>
                    </div>
                </div>
                
                <div class="flex flex-col md:flex-row">
                    <div class="md:w-1/2 mb-6 md:mb-0 md:pr-6">
                        <div class="bg-gray-100 rounded-lg p-4 h-64 flex items-center justify-center">
                            <div class="text-center">
                                <div id="lru-visualization" class="flex items-center justify-center mb-8">
                                    <div class="relative">
                                        <!-- 头节点 -->
                                        <div class="flex items-center mb-4">
                                            <div class="bg-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-sm font-bold">头</div>
                                            <div class="w-12 h-1 bg-gray-400"></div>
                                            <div class="bg-indigo-100 rounded-lg px-4 py-2 font-mono">null</div>
                                        </div>
                                        
                                        <!-- 链表节点 -->
                                        <div class="flex items-center justify-center space-x-4">
                                            <div class="bg-white border-2 border-indigo-400 rounded-lg w-16 h-16 flex flex-col items-center justify-center node-active">
                                                <div class="text-xs font-bold">(1,1)</div>
                                                <div class="text-xs text-gray-500">key=1</div>
                                            </div>
                                            <div class="w-8 h-1 bg-gray-400"></div>
                                            <div class="bg-white border-2 border-gray-300 rounded-lg w-16 h-16 flex flex-col items-center justify-center">
                                                <div class="text-xs font-bold">(2,2)</div>
                                                <div class="text-xs text-gray-500">key=2</div>
                                            </div>
                                        </div>
                                        
                                        <!-- 尾节点 -->
                                        <div class="flex items-center mt-4">
                                            <div class="bg-white border-2 border-gray-300 rounded-lg px-4 py-2 font-mono">null</div>
                                            <div class="w-12 h-1 bg-gray-400"></div>
                                            <div class="bg-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-sm font-bold">尾</div>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="text-sm text-gray-600 text-center">
                                    <p>当前操作: <span class="font-semibold text-indigo-600">get(1)</span> - 将节点(1,1)移到链表头部</p>
                                    <p>容量: 2/2</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="md:w-1/2">
                        <h4 class="font-semibold mb-3 flex items-center">
                            <i class="fas fa-history mr-2 text-indigo-500"></i>
                            操作历史
                        </h4>
                        <div class="space-y-3">
                            <div class="bg-gray-100 rounded-lg p-3 flex items-center">
                                <div class="bg-indigo-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 text-xs">1</div>
                                <div>
                                    <div class="font-mono text-sm">put(1, 1)</div>
                                    <div class="text-xs text-gray-500">添加新节点到头部</div>
                                </div>
                            </div>
                            <div class="bg-gray-100 rounded-lg p-3 flex items-center">
                                <div class="bg-indigo-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 text-xs">2</div>
                                <div>
                                    <div class="font-mono text-sm">put(2, 2)</div>
                                    <div class="text-xs text-gray-500">添加新节点到头部</div>
                                </div>
                            </div>
                            <div class="bg-indigo-50 border border-indigo-200 rounded-lg p-3 flex items-center">
                                <div class="bg-indigo-600 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3 text-xs">3</div>
                                <div>
                                    <div class="font-mono text-sm font-bold">get(1)</div>
                                    <div class="text-xs text-indigo-600">将节点(1,1)移到头部</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Application Section -->
        <section>
            <div class="flex items-center mb-6">
                <div class="w-2 h-8 bg-indigo-500 rounded-full mr-3"></div>
                <h2 class="text-2xl font-bold">实际应用</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-indigo-600 text-white px-4 py-3 flex items-center">
                        <i class="fas fa-database mr-2"></i>
                        <span>数据库缓存</span>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">数据库系统使用LRU算法缓存查询结果，提高频繁访问数据的响应速度。</p>
                        <ul class="space-y-2 text-sm text-gray-600">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2 flex-shrink-0"></i>
                                <span>MySQL查询缓存使用类似LRU的策略</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2 flex-shrink-0"></i>
                                <span>Oracle数据库的缓冲区缓存管理</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-purple-600 text-white px-4 py-3 flex items-center">
                        <i class="fas fa-mobile-alt mr-2"></i>
                        <span>移动应用</span>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">移动应用使用LRU缓存图片、API响应等资源，优化内存使用和性能。</p>
                        <ul class="space-y-2 text-sm text-gray-600">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mt-1 mr-2 flex-shrink-0"></i>
                                <span>Android的LruCache类实现</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mt-1 mr-2 flex-shrink-0"></i>
                                <span>图片加载库如Glide的缓存策略</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```